<html>
<body>
Reports methods whose number of <code>return</code> points exceeds the specified maximum.
Methods with too many <code>return</code> points may be confusing
and hard to refactor.
<p>A <code>return</code> point is either a <code>return</code> statement or a falling through the bottom of a
  <code>void</code> method or constructor.</p>
<p><b>Example:</b></p>
<p>The method below is reported if only two <code>return</code> statements are allowed:</p>
<pre><code>
  void doSmth(User[] users) {
    for (User user : users) {
      if (cond1(user)) {
        user.setId(getId());
        return;
      } else if (cond2(user)) {
        if (cond3(user)) {
          user.setId(getId());
          return;
        }
      }
    }
  }
</code></pre>
<p>Consider rewriting the method so it becomes easier to understand:</p>
<pre><code>
  void doSmth(User[] users) {
    for (User user : users) {
      if (cond1(user) || cond2(user) && cond3(user)) {
        user.setId(getId());
        return;
      }
    }
  }
</code></pre>
<!-- tooltip end -->
<p>Configure the inspection:</p>
<ul>
  <li>Use the <b>Return point limit</b> field to specify the maximum allowed number of <code>return</code> points for a method.</li>
  <li>Use the <b>Ignore guard clauses</b> option to ignore guard clauses.
    A guard clause is an <code>if</code> statement that contains only a <code>return</code> statement</li>
  <li>Use the <b>Ignore for 'equals()' methods</b> option to ignore <code>return</code> points inside <code>equals()</code> methods.</li>
</ul>
</body>
</html>